package com.wj.console.constant;

import java.util.Map;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Constant {
	// excel相对路径
	public static final String EXCEL_DIR = "/excel/";

	// 组织成员头像路径
	public static final String OM_HEAD_IMG = "/img/head";

	// 组织成员身份证
	public static final String OM_IDENTITY_IMG = "/img/identity";
	/**
	 * 公司员工合同路径
	 */
	public static final String ORG_MEMBER_CONTRACT = "/contract";
	
	//营业执照末级路径
	public static final String LICENCE_IMG_PATH = "/license";
	//工作流流程配置文件路径
	public static final String WORKFLOW_DEPLOYMENT_PATH = "/workflow/deployment";
	//文件存放根目录
	public static final String ROOT_PATH = "/upload/org";
	
	//文件存放根目录
	public static final String FINANCING_PATH = "/financing";
	
	/**
	 * 获取企业上传根目录
	 * @param orgId
	 * @return
	 */
	public String getOrgRootPath(String orgId){
		return String.format("%s/%s", ROOT_PATH, orgId);
	}

	// 域名
	private String domainName;

	public String getDomainName() {
		return domainName;
	}

	@Value("#{propertiesReader['url.domainName']}")
	public void setDomainName(String domainName) {
		this.domainName = domainName;
	}

	private Map<String, String> tableNameBusinesDesMaps;// 表名业务对应集合

	public Map<String, String> getTableNameBusinesDesMaps() {
		return tableNameBusinesDesMaps;
	}

	public void setTableNameBusinesDesMaps(Map<String, String> tableNameBusinesDesMaps) {
		this.tableNameBusinesDesMaps = tableNameBusinesDesMaps;
	}

	// 文件存储路径
	public String fileUploadPath;

	public String getFileUploadPath() {
		return fileUploadPath;
	}

	@Value("#{propertiesReader['file.UploadPath']}")
	public void setFileUploadPath(String fileUploadPath) {
		this.fileUploadPath = fileUploadPath;
	}

	// 客户服务电话
	public String serviceTel;

	public String getServiceTel() {
		return serviceTel;
	}

	@Value("#{propertiesReader['service.tel']}")
	public void setServiceTel(String serviceTel) {
		this.serviceTel = serviceTel;
	}

	// 系统额度等级
	public String sysCreditLevel;

	public String getSysCreditLevel() {
		return sysCreditLevel;
	}

	@Value("#{propertiesReader['sys_credit_level']}")
	public void setSysCreditLevel(String sysCreditLevel) {
		this.sysCreditLevel = sysCreditLevel;
	}

	// 系统额度值
	public String sysCreditVal;

	public String getSysCreditVal() {
		return sysCreditVal;
	}

	@Value("#{propertiesReader['sys_credit_val']}")
	public void setSysCreditVal(String sysCreditVal) {
		this.sysCreditVal = sysCreditVal;
	}

	// smtp host
	public String mailSmtpHost;

	public String getMailSmtpHost() {
		return mailSmtpHost;
	}

	@Value("#{propertiesReader['mail.smtp.host']}")
	public void setMailSmtpHost(String mailSmtpHost) {
		this.mailSmtpHost = mailSmtpHost;
	}
	
	// smtp port
	public String mailSmtpPort;

	public String getMailSmtpPort() {
		return mailSmtpHost;
	}

	@Value("#{propertiesReader['mail.smtp.port']}")
	public void setMailSmtpPort(String mailSmtpPort) {
		this.mailSmtpPort = mailSmtpPort;
	}

	// mailFrom
	public String mailFrom;

	public String getMailFrom() {
		return mailFrom;
	}

	@Value("#{propertiesReader['mail.from']}")
	public void setMailFrom(String mailFrom) {
		this.mailFrom = mailFrom;
	}

	// pwd
	public String mailUserPwd;

	public String getMailUserPwd() {
		return mailUserPwd;
	}

	@Value("#{propertiesReader['mail.user.pwd']}")
	public void setMailUserPwd(String mailUserPwd) {
		this.mailUserPwd = mailUserPwd;
	}

	// 默认上午工作时间
	public String amBegintime;

	public String getAmBegintime() {
		return amBegintime;
	}

	@Value("#{propertiesReader['org.am.begintime']}")
	public void setAmBegintime(String amBegintime) {
		this.amBegintime = amBegintime;
	}

	// 默认上午休时间
	public String amEndtime;

	public String getAmEndtime() {
		return amEndtime;
	}

	@Value("#{propertiesReader['org.am.endtime']}")
	public void setAmEndtime(String amEndtime) {
		this.amEndtime = amEndtime;
	}

	// 默认下午工作时间
	public String pmBegintime;

	public String getPmBegintime() {
		return pmBegintime;
	}

	@Value("#{propertiesReader['org.pm.begintime']}")
	public void setPmBegintime(String pmBegintime) {
		this.pmBegintime = pmBegintime;
	}

	// 默认下午休时间
	public String pmEndtime;

	public String getPmEndtime() {
		return pmEndtime;
	}

	@Value("#{propertiesReader['org.pm.endtime']}")
	public void setPmEndtime(String pmEndtime) {
		this.pmEndtime = pmEndtime;
	}

	// 默认周工作时间
	public String workDate;

	public String getWorkDate() {
		return workDate;
	}

	@Value("#{propertiesReader['org.work.date']}")
	public void setWorkDate(String workDate) {
		this.workDate = workDate;
	}

	public String url;
	
	public String getUrl() {
		return url;
	}
	
	@Value("#{propertiesReader['msg.url']}")
	public void setUrl(String url) {
		this.url = url;
	}
    
	public String platformAccountUrl;

	public String getPlatformAccountUrl() {
		return platformAccountUrl;
	}
	
	@Value("#{propertiesReader['kxd.platform.account.url']}")
	public void setPlatformAccountUrl(String platformAccountUrl) {
		this.platformAccountUrl = platformAccountUrl;
	}
	
	public String startTaxAmount;//起始征收税额

	public String getStartTaxAmount() {
		return startTaxAmount;
	}
	@Value("#{propertiesReader['startTaxAmount']}")
	public void setStartTaxAmount(String startTaxAmount) {
		this.startTaxAmount = startTaxAmount;
	}
	
	public String platformAccountOuterUrl;

	public String getPlatformAccountOuterUrl() {
		return platformAccountOuterUrl;
	}
	@Value("#{propertiesReader['kxd.platform.account.outer.url']}")
	public void setPlatformAccountOuterUrl(String platformAccountOuterUrl) {
		this.platformAccountOuterUrl = platformAccountOuterUrl;
	}


	public String rabbitmqHost;//
	public String rabbitmqPort;//
	public String rabbitmqUsername;//
	public String rabbitmqPassword;//

	public String getRabbitmqHost() {
		return rabbitmqHost;
	}

	@Value("#{propertiesReader['rabbitmq.host']}")
	public void setRabbitmqHost(String rabbitmqHost) {
		this.rabbitmqHost = rabbitmqHost;
	}

	public String getRabbitmqPort() {
		return rabbitmqPort;
	}

	@Value("#{propertiesReader['rabbitmq.port']}")
	public void setRabbitmqPort(String rabbitmqPort) {
		this.rabbitmqPort = rabbitmqPort;
	}

	public String getRabbitmqUsername() {
		return rabbitmqUsername;
	}

	@Value("#{propertiesReader['rabbitmq.username']}")
	public void setRabbitmqUsername(String rabbitmqUsername) {
		this.rabbitmqUsername = rabbitmqUsername;
	}

	public String getRabbitmqPassword() {
		return rabbitmqPassword;
	}

	@Value("#{propertiesReader['rabbitmq.password']}")
	public void setRabbitmqPassword(String rabbitmqPassword) {
		this.rabbitmqPassword = rabbitmqPassword;
	}
}
